/**********************************
 * @Author: Ronnie Zhang
 * @LastEditor: Ronnie Zhang
 * @LastEditTime: 2023/12/05 21:29:51
 * @Email: zclzone@outlook.com
 * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
 **********************************/

import { request } from '@/utils'

export default {
  read: (params = {}) => request.post('/system/order/page', { ...params }),
  getOrderPO: id => request.get(`/system/order/${id}`),
  getPayRecord: id => request.get(`/system/payOrder/getBySaleOrder/${id}`),
  getErrandPO: (params = {}) => request.post('/system//errand/dada/list', { ...params }),
  cancelOrder: (params = {}) => request.post('/system/order/cancel', { ...params }),
  confirmByOrderId: id => request.get(`/system/order/confirmByOrder/${id}`), // 接单
  makingCompleted: id => request.get(`/system/order/making/ok/${id}`),
  takeFood: id => request.get(`/system/order/take/food/${id}`),
  finishOrder: id => request.get(`/system/order/finish/${id}`),
  confirmDeliveryOrder: (params = {}) => request.post('/system/delivery/order/confirm', { ...params }), // 获取跑腿订单
}
